Skip to content

branch-4.1: [fix](filecache) Disable sync file cache clear in http api(pick#64321)#64461

Merged
yiguolei merged 1 commit into
apache:branch-4.1from
freemandealer:pick-branch-4.1-pr-64321-20260612
Jun 16, 2026
Merged

branch-4.1: [fix](filecache) Disable sync file cache clear in http api(pick#64321)#64461
yiguolei merged 1 commit into
apache:branch-4.1from
freemandealer:pick-branch-4.1-pr-64321-20260612

Conversation

@freemandealer

Copy link
Copy Markdown
Member

Pick from #64321

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: The file cache HTTP clear endpoint allowed callers to request synchronous clear with sync=true. The synchronous clear path is kept for unit tests and internal callers, but it is not safe to expose through the HTTP API. This change makes the HTTP op=clear endpoint always use async clear. The default behavior remains async, and explicit sync=true returns a warning message while still running async clear. Segment-specific HTTP clear also uses async remove instead of the synchronous remove path.

### Release note

The BE /api/file_cache?op=clear HTTP API no longer supports synchronous clearing. Requests with sync=true now run async clear and return a warning message.

### Check List (For Author)

- Test: Unit Test
    - DORIS_TOOLCHAIN=clang DISABLE_BE_JAVA_EXTENSIONS=ON ENABLE_INJECTION_POINT=ON ENABLE_CACHE_LOCK_DEBUG=0 ENABLE_PCH=0 sh run-be-ut.sh --run --filter=FileCacheActionTest.*
- Behavior changed: Yes. HTTP file cache clear no longer exposes synchronous clear.
- Does this need documentation: No


(cherry picked from commit 29d3a6f)
Picked-from: apache#64321
@freemandealer freemandealer requested a review from yiguolei as a code owner June 12, 2026 09:58
@freemandealer

Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (8/8) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.86% (20393/37861)
Line Coverage 37.44% (193417/516608)
Region Coverage 33.82% (150752/445784)
Branch Coverage 34.83% (66018/189568)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 75.00% (6/8) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.52% (27226/37030)
Line Coverage 57.13% (294043/514690)
Region Coverage 54.81% (246484/449684)
Branch Coverage 56.24% (106890/190055)

@yiguolei yiguolei merged commit 4d15377 into apache:branch-4.1 Jun 16, 2026
28 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants